home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / getjlimit.z / getjlimit
Encoding:
Text File  |  2002-10-03  |  11.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))                                                      ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      getjlimit, setjlimit - control a job's maximum system resource
  10.      consumption
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh>>>>
  14.  
  15.      iiiinnnntttt ggggeeeettttjjjjlllliiiimmmmiiiitttt((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt rrrrlllliiiimmmmiiiitttt ****rrrrllllpppp))))
  16.  
  17.      iiiinnnntttt sssseeeettttjjjjlllliiiimmmmiiiitttt((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt rrrrlllliiiimmmmiiiitttt ****rrrrllllpppp))))
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      Limits on the consumption of a variety of system resources by a job may
  21.      be obtained with the _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function and set by the _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  22.      function.
  23.  
  24.      The _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function retrieves the current and maximum job limit values
  25.      for the specified job ID.  If the _j_i_d value is 0, _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt returns the
  26.      values for the job of the calling process.  If the _j_i_d value is not 0,
  27.      values are returned for the specified job.  In this case, the caller must
  28.      be root, or the real or effective user ID of the caller must match the
  29.      user ID of the user associated with the job.  User association is
  30.      established by the _u_s_e_r parameter for _mmmm_aaaa_kkkk_eeee_nnnn_eeee_wwww_jjjj_oooo_bbbb.  Otherwise, _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  31.      checks for the CAP_MAC_READ capability.  See the capability(4) and
  32.      capabilities(4) man pages for more information on the capability
  33.      mechanism that provides fine grained control over the privileges of a
  34.      process.
  35.  
  36.      The _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function sets the current and maximum job limits values for
  37.      the specified job ID.  If the _j_i_d value is 0, _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt sets the limit
  38.      values for the job of the calling process.  If the _j_i_d value is not 0,
  39.      _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt sets the limit values for the job specified by _j_i_d.  In this
  40.      case, the caller must be root, or the real or effective user ID of the
  41.      caller must match the user ID of the user associated with the job.  User
  42.      association is established by the _u_s_e_r parameter for _mmmm_aaaa_kkkk_eeee_nnnn_eeee_wwww_jjjj_oooo_bbbb.
  43.      Otherwise, _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt checks for the CAP_MAC_WRITE capability.  See the
  44.      capability(4) and capabilities(4) man pages for more information on the
  45.      capability mechanism that provides fine grained control over the
  46.      privileges of a process.
  47.  
  48.      Note: Job limit values (rlim_t) are 64-bit in both n32 and n64 binaries.
  49.      Consequently, n32 binaries can set 64-bit limits.  o32 binaries cannot
  50.      set 64-bit limits because rlim_t is 32-bits in o32 binaries.  IRIX
  51.      supports three Application Binary Interfaces: o32, n64, and n32 (for more
  52.      information on ABIs, see the abi(5) man page).
  53.  
  54.      The possible resources, their descriptions, and the actions taken when
  55.      current limit is exceeded, are summarized below:
  56.  
  57.      JJJJLLLLIIIIMMMMIIIITTTT____CCCCPPPPUUUU       The maximum amount of CPU time in seconds used by all
  58.                       processes in the job.  The _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU signal is sent to
  59.                       each process of a job when it completes consumption of a
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))                                                      ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))
  71.  
  72.  
  73.  
  74.                       whole second of CPU time after the limit has been
  75.                       exceeded.  As a result, processes which are less active
  76.                       in regard to CPU time consumption will experience a
  77.                       "delay" in receiving the SIGXCPU signal.
  78.  
  79.                       The system administrator can set a grace period using
  80.                       the _ssss_yyyy_ssss_tttt_uuuu_nnnn_eeee(1M) command to set the ccccppppuuuulllliiiimmmmiiiitttt____ggggrrrraaaacccceeeettttiiiimmmmeeee
  81.                       parameter.  If the grace period is set, each process
  82.                       will be allowed to continue executing for "grace period"
  83.                       seconds of CPU time after the _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU signal is
  84.                       received.  If a process is still executing after the
  85.                       grace period has expired, it is terminated using a
  86.                       _SSSS_IIII_GGGG_KKKK_IIII_LLLL_LLLL signal.
  87.  
  88.                       If the processes is holding or ignoring the _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU
  89.                       signal, the behavior is scheduling class defined.
  90.                       Unless the _SSSS_VVVV_RRRR_4444______SSSS_IIII_GGGG_NNNN_AAAA_LLLL_SSSS variable in _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_llll_oooo_gggg_iiii_nnnn
  91.                       is set to NO, this signal will be ignored by default.
  92.  
  93.      JJJJLLLLIIIIMMMMIIIITTTT____DDDDAAAATTTTAAAA      The maximum size of a job's heap in bytes.  A _bbbb_rrrr_kkkk(2)
  94.                       call which attempts to exceed this limit will fail with
  95.                       errno set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM.
  96.  
  97.      JJJJLLLLIIIIMMMMIIIITTTT____NNNNOOOOFFFFIIIILLLLEEEE    The maximum number of open file descriptors that all
  98.                       processes in the job can have.  Functions that attempt
  99.                       to create new file descriptors beyond this limit will
  100.                       fail with errno set to _EEEE_MMMM_FFFF_IIII_LLLL_EEEE.
  101.  
  102.      JJJJLLLLIIIIMMMMIIIITTTT____NNNNUUUUMMMMPPPPRRRROOOOCCCC   The maximum number of processes that can be created
  103.                       within the job.  The fork function will fail with the
  104.                       eeeerrrrrrrrnnnnoooo set to _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  105.  
  106.      JJJJLLLLIIIIMMMMIIIITTTT____VVVVMMMMEEEEMMMM      The maximum size of all processes in the job's mapped
  107.                       address space in bytes.  If the _bbbb_rrrr_kkkk(2) or _mmmm_mmmm_aaaa_pppp(2)
  108.                       functions attempt to exceed this limit, they will fail
  109.                       with errno set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM.
  110.  
  111.      JJJJLLLLIIIIMMMMIIIITTTT____PPPPMMMMEEEEMMMM      The maximum amount of physical memory a job may consume.
  112.                       If a job exceeds this limit, all processes associated
  113.                       with the job which continue to consume resources are
  114.                       killed.  Also see the _JJJJ_LLLL_IIII_MMMM_IIII_TTTT______RRRR_SSSS_SSSS limit.
  115.  
  116.      JJJJLLLLIIIIMMMMIIIITTTT____RRRRSSSSSSSS       The maximum size, in bytes, to which a job's resident
  117.                       set size may grow.  This imposes a limit on the amount
  118.                       of physical memory to be given to a job; if memory is
  119.                       tight, the system will prefer to take memory from jobs
  120.                       that are exceeding their declared resident set size.
  121.  
  122.      The value of the current limit of the following resources affect these
  123.      implementation defined constants:
  124.                     Limit   Implementation Defined Constant
  125.                     __________________________________________
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))                                                      ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))
  137.  
  138.  
  139.  
  140.                     JLIMIT_NOFILE   OPEN_MAX
  141.  
  142. EEEERRRRRRRROOOORRRRSSSS
  143.      Under the following conditions, the functions _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt and _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  144.      fail and set _e_r_r_n_o to:
  145.  
  146.      [ENOPKG]       The job limits software is not installed.
  147.  
  148.      [ENOJOB]       A job with the specified job ID cannot be found.
  149.  
  150.      [EINVAL]       The limit denoted by the _r_e_s_o_u_r_c_e argument is invalid, or
  151.                     in the case of _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt, a limit value denoted by the _r_l_p
  152.                     argument is invalid.
  153.  
  154.      [EPERM]        The caller does not have permission to access or change
  155.                     the limit information.
  156.  
  157.      [EFAULT]       The address of the _r_l_p argument is invalid.
  158.  
  159. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  160.      jlimit(1), jstat(1), getjusage(2), getrlimit(2).
  161.  
  162. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  163.      Upon successful completion, _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt and _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt return a value of 0.
  164.      Otherwise, a value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the
  165.      error.
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.